<?php
include('../../__global.php');

class account_setting extends ml_controller
{
    public function init()
    {
        $this->set_access(self::ACCESS_SELF , self::NOACCESS_REDIRECT );
    }
    
    public function initParam()    {
        
    }
    
    public function checkParam() {

    }
    
    public function main()
    {
        // uid 如果为空的容错！~
        $uid = $this->__visitor['uid'];
        
        $oAccount = new ml_model_dbUserAccount();
        $rs = $oAccount->getAccountById($uid);
        if($rs) {
            $row = $oAccount->get_data();
            //    verify mail ??
            switch ($row['verify_email']) {
                  //  第三方登陆账号   没有邮箱
                case ML_NOEMAIL:      
                  $pageId = 'accountSetting3th';  break;                
                  //  正常注册账号
                case ML_VERIFYED:                  
                default:
                    $pageId = 'accountSetting';   break;
            }           
        }
        
          //    未激活    status
/*            case 0:   
                  $pageId = 'notKaiTong';  break;
*/

        ml_tool_actionlog::add_other_action($this->__visitor['uid'] , ML_SINAACTCODE_VIEW_SET_ACCOUNT);
        
        $this->set_page_id($pageId);
        
        $this->set_scope_var('uid' , $uid);
        
        $data = array();
        $this->page_output('user::'.$pageId,$data);

    }
}
new account_setting();
?>